<template>
  <div>
    <h3>展示收藏的音乐</h3>
    {{ collect }}
    <!-- <p>当前歌曲为  ---{{ collect.name }}</p>
    <p>当前歌曲的作者为---{{ collect.singn }}</p>
    <p>当前歌曲的时长为---{{ collect.shichang }}</p> -->
  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
            collect:[]
        }
    },
    mounted(){
        this.getColl()
    },
    methods:{
        getColl(){
            axios.get('http://127.0.0.1:8000/user/collects/',{params:{
                user: this .$store.state.user,
                token:localStorage.getItem('token'),
                
            }})
            .then(resp=>{
                
                console.log(resp);

                if(resp.data.code == 200){
                    this.collect=resp.data.data
                }
            })
            .catch(err=>{
                console.log(err);
            })
            
        }
    }
}
</script>

<style>

</style>